This invention relates to rendering of three-dimensional graphics display system, and more specifically to a system and method for anti-aliasing polygons edge without sorting polygons in depth order.
In a conventional three-dimensional graphics display system, the image content usually comprises of lots of polygons. In the rasterizing process, the polygons are rasterized according to their vertices. Raster image device performs scan conversion algorithm to produce final image. The outlines of polygons are first determined by the raster image device and then the pixels between the edges of polygons are filled. This is a point sampling process in two-dimensional raster grid. Because of the limited resolution of display screen, when an edge is at oblique angle with respect to the direction of the raster scan, jagged spots may result in and an aliasing image being produced on the screen. The so-called anti-aliasing is a scan convergence technique to smooth jagged oblique edges. This smoothing technique is usually a process of blending the present pixels and background pixels according to the percentage of covered areas of the present pixels partially covered by the edges of the polygons. In the conventional three-dimensional graphics display system, the polygon must be sorted in depth order to reveal whether the pixel to be rasterized is in the foreground or in the background. This is a time-consuming process. U.S. Pat. No. 4,780,711 shows a previous approach of scan convergence but doesn""t address the depth-sorting problem when applied to three-dimensional graphics display systems. Area-averaged accumulation buffer or A-buffer is another technique of anti-aliasing method (see Alan Watt and Mark Watt, Advance Animation and Rendering Techniques Theory and Practice, p. 127 The A-buffer) wherein coverage of an area is accomplished by using a bit-wise logical operator. However, A-buffer suffers from the problem of having to search all of the fragments which cover every pixel. Super sampling is another method of anti-aliasing that increases the resolution of the image and down sample to a final image (see Alan Watt and Mark Watt, Advance Animation and Rendering Techniques Theory and Practice, p. 124 Practical super sampling algorithms). However, super sampling consumes much more memory than original non-super sampling, thus drastically increasing hardware costs and complexity. U.S. Pat. No. 5,123,085 provides an anti-aliasing process without depth sorting by calculating every incoming pixel""s coverage and combining it with the present background. This method does not really solve the polygons depth-sorting problem since the order of input changes and final color changes, too. Unlike the above techniques computing the covered area of the pixels, the present application instead performs a new scan convergence process by simply computing the distance from the expanded edge to the original edge and method without sorting polygons in depth order, thus reducing the computational complexity while still obtaining a acceptable resolution to anti-aliasing. It can achieve high image quality but consumes less memory than the super sampling method.
The present application is directed to a method for anti-aliasing three-dimensional graphics without the need of sorting polygons in depth order. Z buffers, including first and second Z sub-buffers and frame buffer including first and second sub-buffers, are operative to store the depth and color of the pixels nearest and second nearest to the viewer on the screen, respectively. A value (weighting value) which indicates the coverage area of every pixel within the expanded regions, is stored. The weighting value is calculated according to the oblique angle of polygon edge and the coordinate of the pixel. There are eight algorithm to calculate said weighting value. Finally an anti-aliasing image is generated by blending the foreground color and background color by said weighting value.
The aforementioned steps implemented by the rasterized device can be implemented by a computer program recorded on a recording medium readable by a general purpose computer. Said recording medium may be a floppy disk, a hard disk, a CD-ROM, a magnetic tape, or other forms of memory.